//
//  MLTabBarButton.m
//  keJiNews
//
//  Created by 魔龙 on 16/4/15.
//  Copyright © 2016年 魔龙. All rights reserved.
//

#import "MLTabBarButton.h"
#import "UiView+Frame.h"
@implementation MLTabBarButton

// 重写高亮状态，选中后自动变回普通状态
- (void)setHighlighted:(BOOL)highlighted {
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.imageView.y = 5;
    self.imageView.width = 25;
    self.imageView.height = 25;
    self.imageView.x = (self.width - self.imageView.width)/2.0;
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.titleLabel.x = self.imageView.x - (self.titleLabel.width - self.imageView.width)/2.0;
    self.titleLabel.y = CGRectGetMaxY(self.imageView.frame) + 2;
    
    self.titleLabel.font = [UIFont systemFontOfSize:10];
    self.titleLabel.shadowColor = [UIColor clearColor];
    
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
}

@end
